]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
LookingGlass: fix a Clutter warning
authorGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 11 Jan 2011 20:14:16 +0000 (21:14 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 13 Jan 2011 21:55:20 +0000 (22:55 +0100)
After destroying an actor, it is no more parented anywhere, so we
cannot allocate it.

https://bugzilla.gnome.org/show_bug.cgi?id=633028

js/ui/lookingGlass.js

index 60bab9b0f896460c509b0928ce7e3894d6402b16..2f894366e45de7148dd4f686fc463a97de119ed6 100644 (file)
@@ -398,6 +398,9 @@ Inspector.prototype = {
     },
 
     _allocate: function(actor, box, flags) {
+        if (!this._eventHandler)
+            return;
+
         let primary = global.get_primary_monitor();
 
         let [minWidth, minHeight, natWidth, natHeight] =
@@ -415,6 +418,7 @@ Inspector.prototype = {
         Clutter.ungrab_pointer(this._eventHandler);
         Clutter.ungrab_keyboard(this._eventHandler);
         this._eventHandler.destroy();
+        this._eventHandler = null;
         this.emit('closed');
     },